package com.baoyi.widget;


import android.content.Context;
import android.widget.LinearLayout;

import com.baoyi.content.content;
import com.baoyi.landscape.R;

public class ItemLinearLayout extends LinearLayout {
	public ItemLinearLayout(Context context, String title, String words,
			String imgurl) {
		super(context);

		this.setOrientation(HORIZONTAL);
		speechView = new SpeechView(context, title, words);
		//speechView.setBackgroundResource(R.drawable.bg3);
		String url = content.server + imgurl;
		imageView = new RemoteImageView(context);
		imageView.setImageUrl(url);
		imageView.setDefaultImage(R.drawable.qq);
		addView(imageView, new LinearLayout.LayoutParams(
				LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
		addView(speechView, new LinearLayout.LayoutParams(
				LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));

	}

	private RemoteImageView imageView;
	private SpeechView speechView;
}
